<template>
	
	<view class="connect_1" :style="background">
		
		
		<z-paging :show-refresher-when-reload="false"  show-refresher-update-time  ref="paging" v-model="dataList" @query="queryList">
			<template #top>
				<back title="积分记录"></back>
				<view class="point_top">
					<view class="point_top_numtitle">
						<!-- <image style="width:52rpx; height:52rpx;" src="../../static/vip/icon_39.png" mode=""></image>
						<span class="point_num">{{info.count}}</span>
						<span class="point_sex">积分</span> -->
					</view>
					<image style="width: 360rpx; height: 360rpx;position: absolute;top:10rpx; right: 30rpx;" src="../../static/vip/icon_40.png" mode=""></image>
					<view class="tost_box">
						<image style="width: 36rpx; height: 36rpx;" src="../../static/vip/icon_38.png" mode=""></image>
						<view class="" style="flex: 1;">
							<u-notice-bar color="#030303" bg-color="rgba(0,0,0,0)" :volume-icon="false" mode="horizontal" v-if="notice_show" :list="list"></u-notice-bar>
						</view>
					</view>
				</view>
			</template>
			
			
			<view class="" >
				
				<view class="point_list">
					<view v-for="(item,index) in dataList" :key="index" class="list_item">
						<view class="list_item_left">
							<span class="list_item_left_1">{{item.sign==0?'获得积分':'使用积分'}}</span>
							<span class="list_item_left_2">{{item.add_time}}</span>
						</view>
						<view class="right_itme">
							<span class="right_itme_1">{{item.sign==0?'+':'-'}}{{item.points}}</span>
							<span class="right_itme_2">积分</span>
						</view>
					</view>
				</view>
			</view>
		</z-paging>
	</view>
</template>

<script>
		import back from '@/componts/back.vue';
		export default {
			components:{
				back
			},
		data() {
			return {
				dataList:[],
				list:[],
				style:{},
				background:{},
				notice_show:false,
				info:{}
			}
		},
		onLoad(data) {
			this.title = '积分消费记录'
		},
		onShow() {
			var style =  uni.getStorageSync('style')
			style = JSON.parse(style)
			this.style = style
			this.background = {
				 'background':`
				 radial-gradient(circle at top left, ${this.style.color8} 0%, transparent 60%), 
				 radial-gradient(circle at top right, ${this.style.color9} 0%, transparent 40%),
				 radial-gradient(circle at bottom left, #f6f6f6 0%, transparent 40%),
				 radial-gradient(circle at bottom right, #f6f6f6 0%, transparent 40%)`,
				'backgroundBlendMode': 'screen', /* 混合模式优化颜色过渡 */
			}
			this.style = style
		},
		
		
		methods: {
			queryList(pageNo, pageSize) {
				var data = {
					
				}
				this.$wqzApi.UserPoints_list(data).then(res=>{
					this.info = res.data
					this.list[0] = res.data.points_desc.desc
					this.notice_show = true
					this.$refs.paging.complete(res.data.list);
				}).catch(err=>{
					this.$refs.paging.complete(false);
				})
				// this.$wqzApi.shop_order_list(data).then(res=>{
				// 	this.$refs.paging.complete(res.data.list);
				// }).catch(err=>{
				// 	this.$refs.paging.complete(false);
				// })
			},
		}
	}
</script>
<style lang="scss" scoped>
	@import url(./point_list.scss);
</style>
